package com.yict.csms.resourceplan.service;

import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.List;
import java.util.Set;

import com.yict.common.service.IBaseService;
import com.yict.csms.baseInfo.entity.PersonOrderSet;
import com.yict.csms.resourceplan.dao.IPersonOrderDao;
import com.yict.csms.resourceplan.entity.PersonOrder;

public interface IPersonOrderService extends IBaseService<PersonOrder, Long, IPersonOrderDao> {
	
	public boolean remove(Long[] ids,Long userid) throws Exception;
	/**
	 * 提交，订更
	 * @param ids 需要提交的数据主键
	 * @param userId 提交的人员
	 * @return
	 * @throws Exception
	 */
	public boolean submit0(Long[] ids,Long userId) throws Exception;
	
	/**
	 * 提交，派更
	 * @param ids 需要提交的数据主键
	 * @param userId 提交的人员
	 * @return
	 * @throws Exception
	 */
	public boolean submit1(Long[] ids,Long userId) throws Exception;
	
	/**
	 * 提交，派更确认
	 * @param ids 需要提交的数据主键
	 * @param userId 提交的人员
	 * @return
	 * @throws Exception
	 */
	public boolean submit2(Long[] ids,Long userId) throws Exception;
	
	/**
	 * 退回到订更
	 * @param ids
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public boolean reject0(Long[] ids, Long userId) throws Exception ;
	
	/**
	 * 退回到派更
	 * @param ids
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public boolean reject1(Long[] ids, Long userId) throws Exception ;
	
	/**
	 * 退回到派更确认
	 * @param ids
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	public boolean reject2(Long[] ids, Long userId) throws Exception ;
	
	/**
	 * 导出订更集
	 * @param pos
	 * @return
	 * @throws Exception
	 */
	public boolean importAsTempl(PersonOrderSet pos) throws Exception;

	/**
	 * 派更保存
	 * @param t
	 * @return
	 * @throws Exception
	 */
	boolean update1(PersonOrder t) throws Exception;

	/**
	 * 复制到订更集
	 * @param pos 
	 * @param orderIds
	 * @throws Exception 
	 */
	public void exportAsTempl(PersonOrderSet pos, Collection<Long> orderIds) throws  Exception;

	List<PersonOrder> listByIds(Collection<Long> ids);
}
